﻿<metro:Window x:Class="SkypeTranslater.SettingsWindow"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:metro="http://schemas.codeplex.com/elysium/theme"
              Title="Settings"
              Width="560"
              Height="400"
              ResizeMode="NoResize"
              WindowStartupLocation="CenterOwner"
              WindowStyle="ToolWindow">
	<metro:Window.ApplicationBar>
		<metro:ApplicationBar x:Name="appBar1">
			<metro:CommandButton Margin="{Binding Source={x:Static metro:Parameters.Instance},
			                                      Path=BoldPadding,
			                                      Mode=OneWay}"
			                     Command="ApplicationCommands.New"
			                     Header="New" >
				<Image Source="pack://application:,,,/SkypeTranslater;component/Icons/Sample16.png" Stretch="None" />
			</metro:CommandButton>
		</metro:ApplicationBar>
	</metro:Window.ApplicationBar>
	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition />
			<RowDefinition Height="0.1*" />
		</Grid.RowDefinitions>
		<DataGrid x:Name="gridGroups"
		          AutoGenerateColumns="False"
		          CanUserAddRows="False"
		          DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor,
		                                                               AncestorType=Window}}"
		          ItemsSource="{Binding Path=Groups,
		                                UpdateSourceTrigger=Explicit}">
			<DataGrid.Columns>
				<DataGridTemplateColumn Header="FromLanguage">
					<DataGridTemplateColumn.CellTemplate>
						<DataTemplate>
							<TextBox Text="{Binding FromLanguage, UpdateSourceTrigger=Explicit}" />
						</DataTemplate>
					</DataGridTemplateColumn.CellTemplate>
				</DataGridTemplateColumn>
				<DataGridTemplateColumn Header="ToLanguage">
					<DataGridTemplateColumn.CellTemplate>
						<DataTemplate>
							<TextBox Text="{Binding ToLanguage, UpdateSourceTrigger=Explicit}" />
						</DataTemplate>
					</DataGridTemplateColumn.CellTemplate>
				</DataGridTemplateColumn>
				<DataGridTemplateColumn Width="150" Header="DisplayName">
					<DataGridTemplateColumn.CellTemplate>
						<DataTemplate>
							<TextBox Text="{Binding DisplayName, UpdateSourceTrigger=Explicit}" />
						</DataTemplate>
					</DataGridTemplateColumn.CellTemplate>
				</DataGridTemplateColumn>
				<DataGridTemplateColumn Width="150" Header="UserHandle">
					<DataGridTemplateColumn.CellTemplate>
						<DataTemplate>
							<TextBox Text="{Binding UserHandle, UpdateSourceTrigger=Explicit}" />
						</DataTemplate>
					</DataGridTemplateColumn.CellTemplate>
				</DataGridTemplateColumn>
				<DataGridTemplateColumn Width="150" Header="IsTraced">
					<DataGridTemplateColumn.CellTemplate>
						<DataTemplate>
							<CheckBox x:Name="chkBox1" IsChecked="{Binding IsTraced, UpdateSourceTrigger=Explicit}" />
						</DataTemplate>
					</DataGridTemplateColumn.CellTemplate>
				</DataGridTemplateColumn>
				<!--
					<DataGridTextColumn Binding="{Binding Path=FromLanguage, UpdateSourceTrigger=Explicit}" Header="FromLanguage" />
					<DataGridTextColumn Binding="{Binding Path=ToLanguage, UpdateSourceTrigger=Explicit}" Header="ToLanguage" />
				-->
			</DataGrid.Columns>
		</DataGrid>
		<StackPanel Grid.Row="1"
		            HorizontalAlignment="Center"
		            Orientation="Horizontal">
			<Button x:Name="btnSave"
			        Width="60"
			        Height="25"
			        Content="Save" />
			<Button x:Name="btnCancel"
			        Width="60"
			        Height="25"
			        Margin="4,0,0,0"
			        Content="Cancel" />
		</StackPanel>
	</Grid>
</metro:Window>
